package com.example.shardingsphere.mapper;

import com.example.shardingsphere.entity.Orders;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * ^_^ ^_^
 *
 * @author wuquan
 * @date 2021/11/04
 */
@Mapper
public interface OrdersMapper {


    @Insert("insert into t_order values( #{id}, #{name})")
    public void insert(Orders orders);


    @Select("select * from t_order")
    @Results({
            @Result(column = "id", property = "id"),
            @Result(column = "name", property = "name")
    })
    List<Orders> select();

}
